package com.yk.filedownload.combiner.combinerCell;

import com.yk.filedownload.DataTransfer.RedisOp.RedisOperation;
import com.yk.filedownload.entity.DataCarrier;

/**
 * Project Name:cykfiledownload
 * File Name:CombinCommonCell
 * Package Name:com.yk.filedownload.combiner.combinerCell
 * Date:2017\12\14 0014
 * Author:dengtianjia
 * Description:
 * Copyright (c) 2017, 重庆云凯科技有限公司 All Rights Reserved.
 */
public abstract class CombinCommonCell implements Runnable {


    public byte[] getFileData(String fileId , RedisOperation redisOperation) throws Exception{
        DataCarrier carrier = new DataCarrier();
        byte[] data = redisOperation.findByKeyByte(fileId);
        carrier.setCompressData(data);
        return carrier.UncompressData();
    }

    public abstract void writeIntoSys(byte[] data);



}
